﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WinForm_Data
{
    public partial class Form1 : Form
    {
        public string Name { get; set; }

        public Form1()
        {
            Name = this.Text;
            InitializeComponent();

            // Specify the data source
            MyOneWayData data = new MyOneWayData();
            myDataBindingSource.DataSource = data;


            // Specify the data source
            DemoCustomer customer = DemoCustomer.CreateNewCustomer();
            customer.CompanyName = "Crystal Consulting";
            DemoCustomerBindingSource.DataSource = customer;

            customerControl1.DataSource = customer;
        }
    }
}
